<?php
/**
 * Created by PhpStorm.
 * User: ytl003
 * Date: 2018/10/1
 * Time: 下午7:14
 */

namespace app\api\model;


class BookingModel extends BaseModel
{
    protected $table = 'booking';
    protected $type = [
        'booking_day' => 'timestamp:Y/m/d'
    ];
    public function site(){
        return $this->hasOne('SiteModel','id','site_id');
    }
    public function getAnswerAttr($value){
         return json_decode($value);
    }
    public function getAnnexAttr($value){
        return json_decode($value);
    }
}